from django.shortcuts import render
from blog.models import Blog
# Create your views here.
def index(request):
    return render(request, "index.html")

def read_blog(request,id):
    blog = Blog.objects.all().order_by("-creat_time")
    print(blog)
    blog = Blog.objects.get(id=id)
    return render(request, "content.html", {"blog":blog})